package com.arcbbs.mapper;

import com.arcbbs.entity.ForumArticleAttachment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ForumArticleAttachmentMapper {
    @Select("select * from forum_article_attachment where article_id =#{articleId}")
    List<ForumArticleAttachment> selectbyid(String articleId);
    @Select("select * from forum_article_attachment where file_id =#{fileId}")
    ForumArticleAttachment getbyfileid(String fileId);

    void updatedownloadcount(String fileId);

    void insert(ForumArticleAttachment forumArticleAttachment);
    @Delete("delete from forum_article_attachment where file_id =#{fileId}")

    void deletebyfileid(String fileId);

    void updatebyfileId(ForumArticleAttachment integralUpdatee, String fileId);

    void updateByarticleId(ForumArticleAttachment uploadinfo, String fileId);
}
